<form nz-form [formGroup]="validateForm" (ngSubmit)="submitForm()"
      ngxsForm="book.editForm" [ngxsFormClearOnDestroy]="true">
  <nz-form-item>
    <nz-form-label [nzSm]="6" [nzXs]="24" nzRequired nzFor="title">图书标题</nz-form-label>
    <nz-form-control [nzSm]="14" [nzXs]="24" nzErrorTip="请输入图书标题!">
      <input nz-input formControlName="title" id="title"/>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="code">图书编码</nz-form-label>
    <nz-form-control [nzSm]="14" [nzXs]="24">
      <input nz-input formControlName="code" id="code"/>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="description">简介</nz-form-label>
    <nz-form-control [nzSm]="14" [nzXs]="24">
      <textarea nz-input placeholder="请输入简介" [nzAutosize]="{ minRows: 3, maxRows: 5 }"
                formControlName="description" id="description"></textarea>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item>
    <nz-form-label [nzSm]="6" [nzXs]="24" nzFor="totalCount">总数量</nz-form-label>
    <nz-form-control [nzSm]="14" [nzXs]="24">
      <nz-input-number formControlName="totalCount" id="totalCount"
                       [nzMin]="0" [nzStep]="10"></nz-input-number>
    </nz-form-control>
  </nz-form-item>

  <nz-form-item nz-row class="register-area">
    <nz-form-control [nzSpan]="14" [nzOffset]="6">
      <button nz-button nzType="primary" [disabled]="!validateForm.dirty || validateForm.invalid">提交</button>
    </nz-form-control>
  </nz-form-item>
</form>
